package cn.xfdzx.android.apps.shop.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import java.util.List;

import cn.xfdzx.android.apps.shop.R;
import cn.xfdzx.android.apps.shop.bean.OneBeen;

/**
 * @author gzk

 */
public class SelectOnePwAdapter extends BaseAdapter {

    private Context mContext;
    private List<String> mList;


    private TextView tv_select_one_name;

    public SelectOnePwAdapter(Context mContext, List<String> mList) {
        this.mContext = mContext;
        this.mList = mList;

    }



    @Override
    public int getCount() {
        return mList.size();
    }

    @Override
    public Object getItem(int i) {
        return i;
    }

    @Override
    public long getItemId(int i) {
        return 0;
    }

    @Override
    public View getView(final int i, View view, ViewGroup viewGroup) {
        view = View.inflate(mContext, R.layout.item_select_one, null);
        tv_select_one_name = view.findViewById(R.id.tv_select_one_name);

        tv_select_one_name.setText(mList.get(i) );

//        if (i == 0) {
//            tv_select_out_stock.setTextColor(mContext.getResources().getColor(R.color.color_02C557));
//            iv_select_out_stock_dui.setVisibility(View.VISIBLE);
//        }else {
//            tv_select_out_stock.setTextColor(mContext.getResources().getColor(R.color.color_333333));
//            iv_select_out_stock_dui.setVisibility(View.GONE);
//        }

        return view;
    }
}
